#include "SpaceInvadersPCH.h"
#include "Environment.h"

static const cr::uint32_t g_hsEnvironmentName = spaceinvaders::prehash::hs_EnvironmentRef;

void Environment::Initialise()
{
	RequestData(g_hsEnvironmentName);
}

void Environment::Shutdown()
{
	ReleaseData();
}

void Environment::Step()
{

}

void Environment::Draw(DrawContext& drawContext)
{
	if (m_pRenderData)
	{
		static float f = 0.0f;
		gp::ParameterBlockScratch<1> params;
		cr::Matrix4f transform = cr::Matrix4f::Identity;
		params.AddParameter()->Set(spaceinvaders::prehash::hs_g_objectToWorld, spaceinvaders::prehash::hs_OBJECTTOWORLD, gk::GpuProgramParameterType::Matrix, transform);
		drawContext.PushParameterBlock(params);
		drawContext.DrawInstances(m_pRenderData);
		drawContext.PopParameterBlock();
	}
}